home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / ShareMailGiftware / autotrace / autotrace-0.30 / README < prev    next >
Text File  |  2002-10-27  |  5KB  |  116 lines

  1. AutoTrace is a utility that converts bitmap to vector graphics.
  2. You find more information at:
  3. http://autotrace.sourceforge.net
  4.  
  5. Some of code was partially derived from limn of GNU fontutils.
  6. However, almost all code is rewritten.
  7.  
  8. The program was tested using Linux, HP UX, Solaris, Windows98,
  9. Windows NT, Windows 2000, MAC and OS/2 4.0. It compiles with GCC,
  10. Borland C++ Builder, Visual C++ and many other compilers.
  11. The program can be used under the GPL license.
  12. It can be compiled standalone, then it can import pnm, pbm, pgm,
  13. ppm, bmp and tga files. If you have installed libpng
  14. (http://www.libpng.org/pub/png/libpng.html) you can also read
  15. png files and with ImageMagick a very broad range of input
  16. formats is available.
  17. You will need at least libpng 1.0.6 and ImageMagick 5.2.1.
  18. Most output formats like dxf, emf, eps, ai, er, fig, svg, epd and sk
  19. are directly integrated in AutoTrace, but if you need swf export you
  20. need to install Ming (http://www.opaque.net/ming/). Also you can
  21. export to the p2e format. This format can be converted by pstoedit
  22. (www.pstoedit.net) to a large number of other formats.
  23. There are two main methods that can be used outline and midline
  24. tracing. If you use Visual C++ 6.0 for compilation be shure to have
  25. at least SP 5 otherwise you could get Memory access violations due
  26. to a bug in earlier versions.
  27.  
  28. Program comes from two parts: command and library.
  29.  
  30. Here the options you can use in the command:
  31.     Usage: autotrace.exe [options] <input_name>.
  32.     Options:<input_name> should be a supported image.
  33.       You can use `--' or `-' to start an option.
  34.       You can use any unambiguous abbreviation for an option name.
  35.       You can separate option names and values with `=' or ` '.
  36.     background-color <hexadezimal>: the color of the background that
  37.       should be ignored, for example FFFFFF;
  38.       default is no background color.
  39.     centerline: trace a character's centerline, rather than its outline.
  40.     color-count <unsigned>: number of colors a color bitmap is reduced to,
  41.       it does not work on grayscale, allowed are 1..256;
  42.       default is 0, that means not color reduction is done.
  43.     corner-always-threshold <angle-in-degrees>: if the angle at a pixel is
  44.       less than this, it is considered a corner, even if it is within
  45.       `corner-surround' pixels of another corner; default is 60.
  46.     corner-surround <unsigned>: number of pixels on either side of a
  47.       point to consider when determining if that point is a corner;
  48.       default is 4.
  49.     corner-threshold <angle-in-degrees>: if a pixel, its predecessor(s),
  50.       and its successor(s) meet at an angle smaller than this, it's a
  51.       corner; default is 100.
  52.     despeckle-level <unsigned>: 0..20; default is no despeckling.
  53.     despeckle-tightness <real>: 0.0..8.0; default is 2.0.
  54.     dpi <unsigned>: The dots per inch value in the input image, affects scaling
  55.       of mif output image
  56.     error-threshold <real>: subdivide fitted curves that are off by
  57.       more pixels than this; default is 2.0.
  58.     filter-iterations <unsigned>: smooth the curve this many times
  59.       before fitting; default is 4.
  60.     input-format:  TGA, PBM, PNM, PGM, PPM or BMP.
  61.     help: print this message.
  62.     line-reversion-threshold <real>: if a spline is closer to a straight
  63.       line than this, weighted by the square of the curve length, keep it a
  64.       straight line even if it is a list with curves; default is .01.
  65.     line-threshold <real>: if the spline is not more than this far away
  66.       from the straight line defined by its endpoints,
  67.       then output a straight line; default is 1.
  68.     list-output-formats: print a list of support output formats to stderr.
  69.     list-input-formats:  print a list of support input formats to stderr.
  70.     log: write detailed progress reports to <input_name>.log.
  71.     output-file <filename>: write to <filename>
  72.     output-format <format>: use format <format> for the output file
  73.     eps, ai, p2e, sk, svg, fig, swf, emf, er, dxf, mif, epd, pdf or 
  74.       cgm can be used.
  75.     remove-adjacent-corners: remove corners that are adjacent.
  76.     tangent-surround <unsigned>: number of points on either side of a
  77.       point to consider when computing the tangent at that point; default is 3.
  78.     report-progress: report tracing status in real time.
  79.     debug-arch: print the type of cpu.
  80.     debug-bitmap: dump loaded bitmap to <input_name>.bitmap.
  81.     version: print the version number of this program.
  82.  
  83. The library is named libautotrace. About usage of the library, 
  84. see autotrace.h. 
  85. Here is a sample progaram that uses libautotrace.
  86. To compile, invoke following commands(on posix):
  87. gcc sample.c `./autotrace-config --libs` `./autotrace-config --cflags`
  88.  
  89.     /* sample.c */
  90.     #include <autotrace/autotrace.h>
  91.  
  92.     int main()
  93.     {
  94.       char * fname = "img/triangle.png";
  95.       at_fitting_opts_type * opts = at_fitting_opts_new();
  96.       at_input_read_func rfunc = at_input_get_handler(fname);
  97.       at_bitmap_type * bitmap ;
  98.       at_splines_type * splines;
  99.       at_output_write_func wfunc = at_output_get_handler_by_suffix("eps");
  100.  
  101.       bitmap = at_bitmap_read(rfunc, fname);
  102.       splines = at_splines_new(bitmap, opts);
  103.       at_splines_write(splines, stdout, "", 
  104.                AT_DEFAULT_DPI,
  105.                wfunc);
  106.       return 0;
  107.     }
  108.  
  109. A Gtk+ based GUI frontend for autotrace is under development.
  110. Visit http://autotrace.sourceforge.net/frontline
  111.  
  112. Programmers wanted!!!
  113.  
  114. Author: Martin Weber (martweb@gmx.net)
  115.  
  116.